
GBasicManual

gscreen (mode,sprite/background visible (2bit), interlace(2bit),freq(1bit))

5 - 256×212, 16 palette colours, palette mode 0 (like SCREEN 5)
6 - 512×212, 4 palette colours, palette mode 0 (like SCREEN 6)
7 - 512×212, 16 palette colours, palette mode 0 (like SCREEN 7)
8 - 256×212, 256 fixed colours, palette mode 0 (like SCREEN 8)
9 - not used
10 - 256×212, 12499 colours BYJK, palette mode 0 (like SCREEN 10)
11 - 256×212, 12499 colours BYJK, palette mode 0 (like SCREEN 11)
12 - 256×212, 19286 colours YJK, palette mode 0 (like SCREEN 12)
13 - 256×212, 64 palette colours
14 - 512×212, 64 palette colours
15 - 256×212, 16 palette colours, palette mode 1, 4 palettes
16 - 512×212, 4 palette colours, palette mode 1, 16 palettes
17 - 512×212, 16 palette colours, palette mode 1, 4 palettes
18 - 256×212, 256 fixed colours, palette mode 1, 1 palette
19 - 512×212, 256 colours fixed (high-resolution GSCREEN 18)
20 - 256×212, 12499 colours BYJK, palette mode 1, 4 palettes
21 - 256×212, 12499 colours BYJK, palette mode 1, 4 palettes
22 - 256×212, YUV (like GSCREEN 12 but then YUV)
23 - 512×212, YJK (high-resolution SCREEN 12)
24 - 512×212, YUV
25 - 256×212, 32768 fixed colours
26 - 512×212, 32768 fixed colours
27 - 384×240/290, overscan, 16 palette colours, 4 palettes
28 - 768×240/290, overscan, 16 palette colours, 4 palettes
29 - 384×240/290, overscan, 64 palette colours, 1 palette
30 - 384×240/290, overscan, 256 fixed colours
31 - 384×240/290, overscan, 32768 fixed colours

--------

vdp: gscreen(5,0,0,0) = vdp(6,%10000001):vdp(7,%00000000):vdp(13,%00000000):out($67,0)
vdp: gscreen(6,0,0,0) = vdp(6,%10010100):vdp(7,%00000000):vdp(13,%00000000):out($67,0)
vdp: gscreen(7,0,0,0) = vdp(6,%10010101):vdp(7,%00000000):vdp(13,%00000000):out($67,0)
vdp: gscreen(8,0,0,0) = vdp(6,%10000010):vdp(7,%00000000):vdp(13,%01000000):out($67,0)
vdp: gscreen(10,0,0,0) = vdp(6,%10000010):vdp(7,%00000000):vdp(13,%10100000):out($67,0)
vdp: gscreen(12,0,0,0) = vdp(6,%10000010):vdp(7,%00000000):vdp(13,%10000000):out($67,0)
vdp: gscreen(13,0,0,0) = vdp(6,%10000010):vdp(7,%00000000):vdp(13,%00000000):out($67,0)
vdp: gscreen(14,0,0,0) = vdp(6,%10010110):vdp(7,%00000000):vdp(13,%00000000):out($67,0)

fix:'vdp: gscreen(15,0,0,0) = vdp(6,%10000001):vdp(7,%00000000):vdp(13,%00000000):out($67,0)
fix:'vdp: gscreen(16,0,0,0) = vdp(6,%10010100):vdp(7,%00000000):vdp(13,%00000000):out($67,0)
fix:'vdp: gscreen(17,0,0,0) = vdp(6,%10010101):vdp(7,%00000000):vdp(13,%00000000):out($67,0)
fix:'vdp: gscreen(18,0,0,0) = vdp(6,%10000010):vdp(7,%00000000):vdp(13,%01000000):out($67,0)

vdp: gscreen(25,0,0,0) = vdp(6,%10000011):vdp(7,%00000000):vdp(13,%00000000):out($67,0)
vdp: gscreen(26,0,0,0) = vdp(6,%10010111):vdp(7,%00000000):vdp(13,%00000000):out($67,0)




--------------------------------------------------------------------------------


http://msxbanzai.tni.nl/v9990/manual.html

--------------------------------------------------------------------------------

++------++-----++---------------------------++-----------------------------------------------++
|| Mode || P#7 ||            R#6 (2bits)    ||                     R#7 (1bit)                ||
||      ++-----++------+------+------+------++---+------+-----+-----+-----+-----+-----+------++
||      || MCS || DSPM | DCKM | XIMM | CLRM || 0 | C25M | SM1 |  SM | PAL |  EO |  IL | HSCN ||
++------++-----++------+------+------+------++---+------+-----+-----+-----+-----+-----+------++
|| B0*  ||   1 ||   2  |    0 |  0-3 |  0-3 || 0 |    0 | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 |    0 ||
|| B2   ||   1 ||   2  |    1 |  1-3 |  0-3 || 0 |    0 | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 |    0 ||
|| B4   ||   1 ||   2  |    2 |  2-3 |  0-1 || 0 |    0 | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 |    0 ||
++------++-----++------+------+------+------++---+------+-----+-----+-----+-----+-----+------++
|| B1   ||   0 ||   2  |    0 |  0-3 |  0-3 || 0 |    0 | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 |    0 ||
|| B3   ||   0 ||   2  |    1 |  1-3 |  0-3 || 0 |    0 | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 |    0 ||
|| B7*  ||   0 ||   2  |    2 |  2-3 |  0-1 || 0 |    0 | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 |    0 ||
++------++-----++------+------+------+------++---+------+-----+-----+-----+-----+-----+------++
|| B5   ||   0 ||   2  |    2 |  2-3 |  0-1 || 0 |    0 |   0 |   0 |   0 |   0 |   0 |    1 ||
|| B6   ||   0 ||   2  |    2 |  2-3 |  0-1 || 0 |    1 |   0 |   0 |   0 |   0 |   0 |    1 ||
++------++-----++------+------+------+------++---+------+-----+-----+-----+-----+-----+------++
|| P1   ||   0 ||   0  |    0 |    1 |    1 || 0 |    0 | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 |    0 ||
|| P2   ||   0 ||   1  |    1 |    2 |    1 || 0 |    0 | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 |    0 ||
++------++-----++------+------+------+------++---+------+-----+-----+-----+-----+-----+------++





P1   -  256x212,x424 (2 layers)
P2   -  512x212,x424
B1   -  256x212,x424
B3   -  512x212,x424
B7 * - 1024x212,x424

B0 * -  192x240,x480,x290,x580
B2   -  384x240,x480,x290,x580
B4   -  768X240,x480,x290,x580

B5 x -  640X400
B6 x -  640X480

--------


DSPM    Display mode selection
3    : Stand-by mode (non-display, no VRAM refresh, kanji ROM readable)
2    : Bit map mode (Bl-6)
1    : P2 mode
0    : P1 mode

DCKM    Pixel clock selection (used in combination with MCS of P#7)
      MCS=0    MCS=1
2    : XTAL1    MCKIN1
1    : XTAL1/2    MCKIN/2
0    : XTAL1/4    *MCKIN/4    (Number of division of master clock)
* Undocumented setting

XIMM    Selection of number of pixels in X direction of image space (Number of pixels in Y direction is automatically calculated from XIMM and CLRM)
3    : 2048 pixels
2    : 1024 pixels
1    : 512 pixels
0    : 256 pixels

CLRM    Selection of bit number per pixel
3    : 16 bits/pixel
2    : 8 bits/pixel
1    : 4 bits/pixel
0    : 2 bits/pixel

C25M    Selection of 640X480 mode, valid when HSCN is "1".
1    : B6 mode
0    : other modes

SM1    Selection of total number of vertical lines during non-interlace, NTSC
1    : 263 lines (In combination with SM, the sub-carrier phase is inverted for each frame.)
0    : 262 lines

SM    Selection of horizontal frequency (invalid when in B5 and B6 modes)
1    : 1H=fsc/227.5 (the sub-carrier phase is inverted for each line.)
0    : 1H=fsc/228

PAL    Selection of PAL mode (invalid when in B5 and B6 modes)
1    : Vertical frequency becomes PAL specification.
0    : Vertical frequency becomes NTSC specification.

EO    Selection of vertical resolution during interlace (invalid when in B5 and B6 modes)
1    : Twice the vertical resolution during non-interlace
0    : Same as during non-interlace

IL    Selection of interlace mode (invalid when in B5 and B6 modes)
1    : Interlace
0    : Non-interlace

HSCN    Selection of horizontal high scan mode
1    : B5, B6 modes
0    : other modes

PLTM (#13:b7,b6)
YAE (#13:b5)


             DSPM  PLTM  CLRM  YAE
(1) PP        0,1    0     1     -
(2) BYJK        2    2     2     0
(3) BYJKP       2    2     2     1
(4) BYUV        2    3     2     0
(5) BYUVP       2    3     2     1
(6) BD16        2    0     3     -
(7) BD8         2    1     2     -
(8) BP6         2    0     2     -
(9) BP4         2    0     1     -
(10) BP2        2    0     0     -



--------------------------------------------------------------------------------

P#0    VRAM DATA    (R/W)
P#1    PALETTE DATA    (R/W)
P#2    COMMAND DATA    (R/W)
P#3    REGISTER DATA    (R/W)
P#4    REGISTER SELECT    (W)
P#5    STATUS    (R)
P#6    INTERRUPT FLAG    (R/W)
P#7    SYSTEM CONTROL    (W)

--------------------------------------------------------------------------------

Mode    Master clock (MHz)     Pixel clock (MHz)    Display resolution () interlaced (pixel x pixel)    Color depth
(bits per pixel)    Image size by width (lines)
256 pixels    512 pixels    1024 pixels    2048 pixels

*B0    14.3    3.6    Overscan NTSC
192x240 (192x480)
Overscan PAL
192x290 (192x580)    16    1024    512    256
8    2048    1024    512    256
4    4096    2048    1024    512
2    8192    4096    2048    1024

B1    21.5    5.4    NTSC/PAL
256x212 (256x424)    16    1024    512    256
8    2048    1024    512    256
4    4096    2048    1024    512
2    8192    4096    2048    1024

B2    14.3    7.2    Overscan NTSC
384x240 (384x480)
Overscan PAL
384x290 (384x580)    16        512    256
8        1024    512    256
4        2048    1024    512
2        4096    2048    1024

B3    21.5    10.7    NTSC/PAL
512x212 (512x424)    16        512    256
8        1024    512    256
4        2048    1024    512
2        4096    2048    1024
B4    14.3    14.3    Overscan NTSC
768x240 (768x480)
Overscan PAL
768x290 (768x580)    4            1024    512
2            2048    1024
B5    21.5    21.5    640x400 @ 25.3kHz    4            1024    512
2            2048    1024
B6    25.2    25.2    640x480 @ 31.5kHz    4            1024    512
2            2048    1024
*B7    21.5    21.5    NTSC/PAL
1024x212 (1024x424)    4            1024    512
2            2048    1024
* Undocumented mode



